package com.sinosoft.perfect.system._authorization;

import java.sql.SQLException;
import java.util.List;

import com.sinosoft.perfect.system._.po.TUserRolebusinessRelation;
import com.sinosoft.perfect.system._.po.TUserRolesysRelation;
import com.sinosoft.perfect.system._authorization.vo.RoleResourceRelationAuthorize;

public interface MapperSystemAuthorization {

	public List<RoleResourceRelationAuthorize> queryTRoleResourceRelationByResourceAndRole(RoleResourceRelationAuthorize roleresourcerelationauthorize) throws SQLException;

	public List<String> queryResourceIdsOfRole(String roleSystemId) throws SQLException;

	public Object insertByRoleResourceRelationAuthorize(RoleResourceRelationAuthorize roleresourcerelationauthorize) throws SQLException;

	public int updatePowerOfRoleResource(RoleResourceRelationAuthorize roleresourcerelationauthorize) throws SQLException;

	public int deletePowerOfRoleResource(RoleResourceRelationAuthorize roleresourcerelationauthorize) throws SQLException;

	public List<String> queryUserIdsOfUnit(String unitId) throws SQLException;

	public List<TUserRolesysRelation> queryRolesystemsOfUser(String userId) throws SQLException;

	public Object insertByTUserRolesysRelation(TUserRolesysRelation tuserrolesysrelation) throws SQLException;

	public int deleteRolesystemRelationsByUser(String userMainId) throws SQLException;

	public int deleteRolesystemRelationsByUsersOfUnit(String userMainId) throws SQLException;

	public List<TUserRolebusinessRelation> queryRolebusinessOfUser(TUserRolebusinessRelation tuserrolebusinessrelation) throws SQLException;

	public Object insertByTUserRolebusinessRelation(TUserRolebusinessRelation tuserrolebusinessrelation) throws SQLException;

	public int deleteRolebusinessRelationsByUser(String userMainId) throws SQLException;

	public int deleteRolebusinessRelationsByUsersOfUnit(String unitId) throws SQLException;

	public List<TUserRolebusinessRelation> queryRolebusinessOfUser(String userId) throws SQLException;

	public void deleteTUserRolesysRelation(TUserRolesysRelation tUserRolesysRelation) throws SQLException;
	
	public void deleteTUserRolebusinessRelation(TUserRolebusinessRelation tUserRolebusinessRelation) throws SQLException;

}
